#include <bits/stdc++.h>
using namespace std;

class Solution {
public:
    string countAndSay(int n) {
        string RLE_Array = "1";
        for(int i=1; i<n; ++i){
            string tmp;
            int size = RLE_Array.size();
            int cnt = 1;
            for(int ind=1; ind<=size; ++ind){
                if(RLE_Array[ind] == RLE_Array[ind-1]) ++cnt;
                else {
                    tmp+=(cnt+'0');
                    cnt = 1;
                    tmp+=RLE_Array[ind-1];
                }
            }
            RLE_Array = tmp;
        }
        return RLE_Array;
    }
};

int main(){

}